import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/user/pageQuery',
    method: 'post',
    data: params,
  })
}

export function doDelete(id) {
  return request({
    url: '/user/deleteById?id=' + id,
    method: 'post',
    data: {},
  })
}

export function doEdit(data) {
  return request({
    url: '/user/saveOrUpdate',
    method: 'post',
    data: data,
  })
}

export function updateUserStatus(id, status) {
  return request({
    url: '/user/updateWithoutNull',
    method: 'post',
    data: { id, isEnable: status },
  })
}
